<?php declare(strict_types=1);

namespace App\Services\ElectronicSignature\Strategy;

use App\Services\ElectronicSignature\Exception\ElSignException;

abstract class AbstractElectronicSignature implements ElectronicSignatureInterface
{


    public function getApplyType(string $applyType): string
    {

//        [
//            'store_type' => 1,
//            'store_type_desc' => '个体工商户',
//        ],
//            [
//                'store_type' => 2,
//                'store_type_desc' => '企业',
//            ],
//            [
//                'store_type' => 3,
//                'store_type_desc' => '小微商户',
//            ],
//            [
//                'store_type' => 4,
//                'store_type_desc' => '学校-教育行业',
//            ],

        switch ($applyType) {
            case "1":
            case "3":
                //个人开户申请
                $type = "person";
                break;
            case "2":
                //企业开户
                $type = "company";
                break;
            default:
                throw new ElSignException("签名类型异常");
        }
        return $type;
    }



}